home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / comm / bbs / nim_v0_9.lha / nim.gen.bas < prev    next >
Encoding:
BASIC Source File  |  1991-01-11  |  1.1 KB  |  58 lines

  1. DEFSNG a-z
  2. PRINT :PRINT :PRINT 
  3. PRINT "Nim Games File Generator"
  4.  
  5. loop:
  6.  
  7. PRINT:PRINT
  8. PRINT "This prog is highly destructive."
  9. PRINT "It wipes out all your nim games completely."
  10. PRINT "Okay, so are you sure you want to run it?"
  11. PRINT "You must type in 'YES' in full!!"
  12. PRINT
  13. INPUT sure$
  14. IF UCASE$(sure$)<>"YES" THEN END
  15.  
  16. PRINT :PRINT 
  17. PRINT "What's the pathname of where the door is kept?"
  18. PRINT "       (EG 'DH1:Doorfiles1/Door21/' ) "
  19. PRINT 
  20. PRINT " << Don't forget the trailing slash! >> "
  21. PRINT 
  22. INPUT path$
  23. PRINT :PRINT 
  24. PRINT path$; "  ?"
  25. PRINT 
  26. INPUT "Is that correct (y/N) ";check$
  27. IF UCASE$(LEFT$(check$,1))<>"Y" THEN loop:
  28.  
  29. aa=0
  30. flnm$=path$+"nim.games"
  31.  
  32. OPEN flnm$ AS #2 LEN=83
  33. FIELD #2, 4 AS a$(0), 5 AS a$(1), 25 AS a$(2), 5 AS a$(3),25 AS a$(4), 10 AS a$(5), 5 AS a$(6), 3 AS a$(7), 1 AS a$(8)
  34.  
  35.  
  36. FOR k=1 TO 99
  37.  
  38.   LSET a$(0) = "0"
  39.   LSET a$(1) = "0"
  40.   LSET a$(2) = " "
  41.   LSET a$(3) = "0"
  42.   LSET a$(4) = " "
  43.   LSET a$(5) = "Never"
  44.   LSET a$(6) = "0"
  45.   LSET a$(7) = "0"
  46.   LSET a$(8) = "0"
  47.  
  48.   PUT #2,k
  49. NEXT k
  50. CLOSE #2
  51.  
  52. PRINT :PRINT :PRINT 
  53. PRINT  "The blank Games file has now been generated."
  54. PRINT :PRINT 
  55. INPUT "Press Return to exit"; x$
  56. END
  57.  
  58.